package com.tgy.algorithm.base;


class HeapSort {
    int[] nums;
    int size;
    int maxSize;
    public HeapSort(int maxSize) {
        nums = new int[maxSize];
        this.maxSize = maxSize;
        this.size = 0;
    }

    public void insert(int num) {
        if(size >= maxSize) {
            throw new IndexOutOfBoundsException("超出了最多的容器范围");
        }

        this.nums[size++] = num;

    }
}

public class _堆排序 {

    public static void main(String[] args) {

        /**
         *                 4
         *               2    2
         *
         *             3   4

         *  当前节点的序号是 n
         *  则下面的子节点分别是 2*n + 1  2*n + 2
         *
         *  如果当前节点的序号是 n。
         *  则当前节点的父节点是 (n-1)/2
         */

    }
}
